package example.springboot.controller;

import example.springboot.model.t_user;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

@Controller
public class CommentController {
    @RequestMapping("/comment")
    public String commentDisplay(HttpServletRequest request,
                                 @RequestParam("content")String comment,
                                 @RequestParam("parentId")Long parentid,
                                 @RequestParam("type")Integer type){
        t_user t_user = (example.springboot.model.t_user) request.getSession().getAttribute("t_user");
        System.out.println(t_user);
        System.out.println(comment+" "+parentid+" "+type);
        return "/commentDisplay";
    }
}
